cap program drop estadd_YFE
program estadd_YFE, eclass
/* adds a macro YFE with value "Yes" if _Iyear is in the regression,
and "No" otherwise. must use xi: i.year for the function to work
properly) */
  if regexm("`e(cmdline)'","_Iyear") {
    local word "Yes"
  }
  else {
    local word "No"
  }
  ereturn local YFE = "`word'"
end
